namespace Ds.DataBase.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class _20200815003 : DbMigration
    {
        public override void Up()
        {
            CreateTable(
                "dbo.BeiKaoHeJiaoZhiGongs",
                c => new
                    {
                        bkhjzgid = c.Int(nullable: false, identity: true),
                        username = c.String(),
                        userinfoId = c.String(),
                        XingMing = c.String(),
                        XingBie = c.Int(nullable: false),
                        ksmc = c.String(),
                        zwmc = c.String(),
                        Users_userinfoId = c.Guid(),
                        KaoHeFanWei_RenYuan_khfwryid = c.Int(),
                    })
                .PrimaryKey(t => t.bkhjzgid)
                .ForeignKey("dbo.UserInfoes", t => t.Users_userinfoId)
                .ForeignKey("dbo.KaoHeFanWei_RenYuan", t => t.KaoHeFanWei_RenYuan_khfwryid)
                .Index(t => t.Users_userinfoId)
                .Index(t => t.KaoHeFanWei_RenYuan_khfwryid);
            
        }
        
        public override void Down()
        {
            DropForeignKey("dbo.BeiKaoHeJiaoZhiGongs", "KaoHeFanWei_RenYuan_khfwryid", "dbo.KaoHeFanWei_RenYuan");
            DropForeignKey("dbo.BeiKaoHeJiaoZhiGongs", "Users_userinfoId", "dbo.UserInfoes");
            DropIndex("dbo.BeiKaoHeJiaoZhiGongs", new[] { "KaoHeFanWei_RenYuan_khfwryid" });
            DropIndex("dbo.BeiKaoHeJiaoZhiGongs", new[] { "Users_userinfoId" });
            DropTable("dbo.BeiKaoHeJiaoZhiGongs");
        }
    }
}
